The present invention relates to a frequency measurement circuit capable of measuring the frequency of an input signal, by counting the number of waves of the input signal for a specified period, and more particularly to a frequency measurement circuit that can measure the frequency with a higher accuracy than the conventional circuits. The frequency measurement circuit of the present invention is applicable to a time constant regulation circuit to be mounted in a semiconductor integrated circuit device, etc.
When a circuit having a time constant like an oscillator or a filter is mounted in a semiconductor integrated circuit, the time constant could be changed, by a process change or operation conditions of the semiconductor integrated circuit. In order to keep the time constant (for instance, an oscillating frequency, or specific frequency) of these circuits in a specific range, a time constant regulation device has been used.
In Japanese Patent Application No. H10-222198 entitled xe2x80x9cFILTER CHARACTERISTICS REGULATION METHOD AND APPARATUSxe2x80x9d filed Aug. 6, 1998 by the present applicant, for instance, the time constant regulation device has been disclosed as a filter characteristic regulation device for regulating the characteristic frequency of a filter. Such a time constant regulation apparatus, for instance., enters a step signal containing a wide frequency band signal into a filter, to allow the filter to output the output signal corresponding to the characteristic frequency of the filter, and measures the frequency of the output signal, and supplies a control signal to the filter so that the obtained frequency can be a desired characteristic frequency. Generally, frequency is measured by counting the number of waves of a reference clock of the output signal during a specified cycle.
The adjustment accuracy of such a time constant regulation device as described above is significantly affected by an accuracy of a frequency measurement circuit, a component element of the device. As described above, in the case of entering a step signal to measure the frequency of the output signal, since the waveform of the output signal can decay in a short period of time, it is required to count the number of waves of a reference clock in a short period of time. Further, the frequency of the reference clock cannot be set with excessive freedom, due to the requirement of other circuits.
FIG. 11 is a configuration drawing of the conventional frequency measurement circuit. And, FIG. 12 shows an operating waveform diagram of the circuit. The frequency measurement circuit shown in FIG. 11 is a circuit to measure the frequency of the input signal Cin, and measures the cycle of the input signal Cin, utilizing the reference clock Cb having a shorter cycle than the input signal Cin, and known frequency. The frequency measurement circuit includes a select signal generator circuit 1 which counts the predetermined number of pulses (or number of waves) of the input signal Cin, when the input signal Cin is entered, and generates a select signal SEL during the counting, a selector circuit 2 to allow the reference clock Cb to pass through while the select signal SEL is an H level, and a reference clock wave number measurement circuit 3 to count the number of pulses (or number of waves) of the supplied reference clock Cb. Also, to the select signal generator circuit 1 and the reference clock wave number measurement circuit 3, both of which have a wave number measuring function, a reset signal Rst is supplied.
As shown in FIG. 12, when the cycle of the input signal Cin to be measured is expressed by tm, and the cycle of the reference clock C6 is expressed by tB, by counting the reference clock Cb during the period of the M cycle of the input signal Cin, the cycle of the input signal Cin can be measured, and further, the frequency fm of the input signal Cin can be obtained. As shown in the operating waveform diagram in FIG. 12, by the reset signal Rst having at an L level for the first time, the select signal generator circuit 1 and the reference clock wave number measurement circuit 3 is reset. And, during the M cycle of the input signal Cin corresponding to the time from t0 through tM, the select signal SEL is kept at the H level, and the reference clock Cb is supplied to the reference clock wave number measurement circuit 3. The reference clock wave number measurement circuit 3 counts, for instance, the number of the rising edges of the reference clock Cb during that time, and outputs the final counted value as the frequency measurement result OUT.
Generally, there are few cases where the phase of the input signal Cin perfectly agrees with the phase of the reference clock Cb. Therefore, by counting the rising edges (or the falling edges, or both of the rising and falling edges) of the reference clock Cb, during the period from the rising edge (t0) of the input signal Cin to the Mth rising edge (tM), the reference clock wave number measurement circuit 3 can count the number of waves N of the reference clock Cb with satisfactory accuracy. The period of counting can be either from the rising or the falling edge to the rising or falling edge.
However, when the edge of the input signal and the edge of the reference clock determining the operating period of both of the wave number measurement circuits 1 and 3 are agreed at the time when measurement starts, or when measurement ends, an error can take place in the measurement made by the reference clock wave number measurement circuit 3. In other words, as shown in FIG. 12, at the time when wave number counting starts to and at the time when the wave number counting ends tM, the phase of the input signal Cin may agree with the phase of the reference clock Cb. In such a worst case, a wave number measurement circuit in the reference clock wave number measurement circuit 3 can erroneously count the rising edge of the reference clock Cb, at the times tO and tM. This possibility is caused by the following two cases, e.g. (1) in the case where the circuit dose not count the rising edge of the reference clock Cb both at the times tO and tM; and (2) in the case where the circuit counts the rising edge of the reference clock Cb both at the times tO and tM. In the case of (1), the total number of counts is Nxe2x88x921, and in the case of (2), the total number of count is N+1. Here, when the rising edge of the reference clock is counted at either time of tO or tM, there is no problem, since the counted result is the same as the normal counted number.
In normal cases, if the counted number of waves of the reference clock measured by the reference clock wave number measurement circuit 3 is N to the measured wave number M of the input signal Cin, when the frequency of the reference clock is fB, the frequency fm of the input signal can be
fm=(M/N)fBxe2x80x83xe2x80x83(1)
On the other hand, when both of the phases agreed, if the counted number of waves of the reference clock is Nxc2x11 to the measured wave number M of the input signal, the frequency fm of the input signal is
fm=(M/(Nxc2x11))fBxe2x80x83xe2x80x83(2)
Accordingly, the measurement error is as the following equation.                               Δ          ⁢                      xe2x80x83                    ⁢          f                =                                                            M                                  N                  ±                  1                                            ⁢                              xe2x80x83                            ⁢                              f                B                                      -                                          M                N                            ⁢                              xe2x80x83                            ⁢                              f                B                                              =                                                    ∓                M                                            N                ⁢                                  xe2x80x83                                ⁢                                  (                                      N                    ±                    1                                    )                                                      ⁢                          xe2x80x83                        ⁢                          f              B                                                          (        3        )            
In the conventional examples, in order to improve the accuracy in the measured frequency, according to the equation (3), it can be considered to increase the counted number of waves N by increasing the measured wave number M, or, by increasing the frequency fB of the reference clock Cb to be counted by the wave number measurement circuit 3. However, if the measured number of waves M is increased, the measurement time becomes longer.
As described above, in the case of entering a step signal into a filter, and measuring the frequency of the output waveform outputted from the filter, since the output signal can decay in a short period of time, the measurement time is not preferable to be extended. Also, when the reference clock is heightened, the current consumption is increased, and moreover, since the reference clock cannot be set optionally in many cases, for reasons of using a semiconductor integrated circuit, thoughtless higher setting for the reference clock cannot be made.
It is therefore an object of the present invention to provide a frequency measurement circuit that enables the accuracy in measuring frequency to be improved, even when the measurement time is short.
Another object of the present invention is to provide a frequency measurement circuit that enables the accuracy in measuring frequency to be improved, without the need to raise the frequency of the reference clock.
To attain the above objects, an aspect of the present invention provides a frequency measurement circuit comprising a plurality of frequency measurement units each of which counts a reference clock during a counting period having a predetermined number of waves of an input signal, each of the frequency measurement units counts the reference clock, with shifted counting periods, respectively. Moreover, an adder is provided to add the counted numbers of the plurality of the frequency measurement units. By shifting the counting periods, even if the phase of the input signal agrees with the phase of the reference clock at the time counting starts and at the time counting ends on a certain frequency measurement unit, there is scarcely any possibility of agreement of the phases on other frequency measurement units. Therefore, by utilization of the added number of counts, frequency can be measured with high accuracy. In addition, by making the counting periods being shifted with overlapping each other, extension of the measurement time is not required any longer.
To attain the above objects, a second aspect of the present invention provides a frequency measurement circuit for measuring a frequency of an input signal, comprising:
a first frequency measurement unit for counting the reference clock during a first counting period having a predetermined number of waves of the input signal;
a second frequency measurement unit for counting the reference clock during a second counting period having the predetermined number of waves of the input signal; and
an adder for adding the counted numbers of the first and the second frequency measurement units, wherein
the first and second counting periods shift and overlap each other.
As to the first and the second frequency measurement units, three or more units may be employed, if necessary. In that case, it is preferable that the individual counting periods are also shifted each other.
To attain the above objects, a third aspect of the present invention provides a frequency measurement circuit for measuring a frequency of an input signal, comprising:
a frequency measurement unit for counting a reference clock during a counting period having a predetermined number of waves of the input signal, wherein the frequency measurement unit counts the reference clock by assigning a lighter weight to the counts at a starting time and ending time of the counting period, compared with the other times.
In the case of the third aspect of the present invention, frequency measurement with high accuracy can be made without providing a plurality of frequency measurement units.